#ifndef XMLRPCCLIENT_H
#define XMLRPCCLIENT_H

#include "httpclient.h"
#include <QObject>
#include <QString>
#include <QVariant>
#include <QByteArray>
#include <QVariantList>

class XmlRpcClient : public HttpClient
{
	Q_OBJECT
public:
	XmlRpcClient( const QString &host, const QString path, const quint16 port );

	void execute( const QString &method, const QVariantList &params );
	const QString& method()const{return m_method;}
	const QByteArray& rawResponse()const{return m_rawData;}
	void abort(){socket->disconnect( this );socket->abort();}
signals:
	void dataReady( const QVariant &data, const QString&);

	private slots:
		void onDataReady( const QByteArray &data );
protected:
	QString m_method;
	QByteArray m_rawData;
};

#endif // XMLRPCCLIENT_H
